Document Variables provide a mechanism for defining values that can be used in Cut2D Desktop's Document Variables. They can either be created in the Document Variables dialog (right) which is accessible under the Edit menu, or created from any Calculation Edit Box which supports variables by right clicking and selecting Insert New Document Variable from the Popup Menu.
Right-click an edit-box to insert a new or existing Document Variable:
New Document Variable names must begin with a letter and then may consist of letter, number and underscore characters. Once created, they may be edited in the table beneath the New Variable section fo the Document Variables Dialog.
Variables can be exported to a text file and imported into another job. When importing, any existing variable values with the same name will be replaced.
Variables may be deleted if they're not being used in any toolpath calculations but only when there are no toolpath creation forms open.
Once created a Document Variable may be used in any Calculation Edit Box by enclosing its name within a pair of curly braces as illustrated in the figure below.
Right clicking in a Calculation Edit Box provides a Popup Menu that provides shortcuts for creating new Variables and inserting existing variables into the Edit Box.
Once a Document Variable has been created from the Popup Menu it will be inserted into the Edit Box.
Declared Document Variables can be easily accessed from a calculation edit box. Right-click on the calculation edit box and you will be presented with a menu showing the document variables available currently, as well as an option to quickly insert a new document variable.
Numerical edit boxes generally support simple calculations.
A sum can be entered directly into the edit box:
Having typed an equation, pressing the = key will perform the entered calculation and fill the edit box with the answer.
As well as the simple numerical calculations, such as 3+(4/5), several of Cut2D Desktop's stored values can be accessed by using certain letters (which are not case-sensitive): When used, Cut2D Desktop substitutes the character with the appropriate value in the calculation.
Character |
Name |
Example |
Description |
---|---|---|---|
W or X |
Material Width |
w/2= |
Half of the material width |
H or Y |
Material Height |
H*2= |
Twice the height of the material |
T or Z |
Material Thickness |
t-0.25= |
0.25 units less than the material thickness |
P |
PI (3.141593) |
P*10^2= |
Area of a 10 radius circle (π.r2) |
I |
Imperial Conversion |
25.4*i= |
Converts 25.4mm to inches |
M |
Metric Conversion |
2*M= |
Converts 2 inches to millimetres |
' |
Feet |
2'+10= |
34 inches (2 feet and 10 inches) |